package com.masterclient.app.businessmodule.settingmodule.license;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.eoner.baselib.widget.navgation.FCNavigationBar;
import com.masterclient.app.R;
import com.eoner.baselibrary.utils.ViewTransformUtil;
import com.masterclient.app.base.FCBusinessActivity;

import java.util.List;

import butterknife.BindView;

/**
 * 作者：sean
 * 创建时间：2017/8/19 14:28
 * 功能说明：
 */

public class LicenseActivity extends FCBusinessActivity {

    @BindView(R.id.ll_con)
    LinearLayout ll_con;
    List<String> images;

    @Override
    protected int requireGetLayoutId() {
        return R.layout.activity_license;
    }

    @Override
    protected void requireSetCustomNavigationBar(FCNavigationBar navigationBar) {
        navigationBar.setTitle("证照信息");
    }

    @Override
    protected void requireInitUIAndData(Bundle savedInstanceState) {
        images = (List<String>) getIntent().getSerializableExtra("images");
        for (String img : images) {
            if (TextUtils.isEmpty(img)) {
                continue;
            }
            ImageView imageView = new ImageView(mContext);
            imageView.setAdjustViewBounds(true);
            imageView.setScaleType(ImageView.ScaleType.FIT_XY);
            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            imageView.setLayoutParams(params);
            ll_con.addView(imageView);
            ViewTransformUtil.glideImageView(this, img, imageView, R.mipmap.defaults);
        }
    }


}
